package airhockey.spel;

import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;

public class Puk {
	private int radius;		//straal van de puk
	private Paint puk;		//puk zelf
	private int x;			//de X coordinate
	private int y;			//de Y coordinate
	private int xVel; 		//de snelheid richting de x as
	private int yVel;		//de snelheid richting de y as
	private int mass;		//gewicht van de puk
	private boolean dragged;	//of de puk geslepen wordt
	
	public static int xVelDefault = 1; //standaard snelheid x
	public static int yVelDefault = 1; //standaard snelheid y
	
	/**
	 * Maak een nieuwe puk aan met de x en y coordinaten
	 * @param x
	 * @param y
	 */
	public Puk(int x, int y) {
		this.x = x;
		this.y = y;
		
		this.radius = 20;
		
		puk = new Paint();
		puk.setColor(Color.MAGENTA);
		
		xVel = xVelDefault;
		yVel = yVelDefault;
		setMass(15);
		setDragged(false);
	}
	
	/**
	 * Draw the puk on the screen
	 * @param canvas
	 */
	public void draw(Canvas canvas) {
		canvas.drawCircle(x, y, radius, puk);
	}
	
	

	//**************************************************
	//Getters and setters
	//
	//**************************************************
	public int getX() {
		return x;
	}
	public int getY() {
		return y;
	}
	public int getRadius() {
		return radius;
	}
	public void setX(int x) {
		this.x = x;
	}
	public void setY(int y) {
		this.y = y;
	}
	public void setRadius(int radius) {
		this.radius = radius;
	}
	public int getxVel() {
		return xVel;
	}
	public int getyVel() {
		return yVel;
	}

	public void setxVel(int xVel) {
		this.xVel = xVel;
	}

	public void setyVel(int yVel) {
		this.yVel = yVel;
	}

	public void setMass(int mass) {
		this.mass = mass;
	}

	public int getMass() {
		return mass;
	}

	public void setDragged(boolean dragged) {
		this.dragged = dragged;
	}

	public boolean isDragged() {
		return dragged;
	}
}
